home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Columbia Kermit
/
kermit.zip
/
newsgroups
/
misc.20041116-20060924
/
000396_rock_spambust_violin@yahoo.com_Sun Aug 20 15:59:35 2006.msg
< prev
next >
Wrap
Internet Message Format
|
2020-01-01
|
2KB
Path: reader2.panix.com!reader1.panix.com!panix!newsfeed-00.mathworks.com!newsfeed2.dallas1.level3.net!news.level3.com!postnews.google.com!b28g2000cwb.googlegroups.com!not-for-mail
From: "tomviolin" <rock_spambust_violin@yahoo.com>
Newsgroups: comp.protocols.kermit.misc
Subject: logging / flushing output
Date: 13 Aug 2006 09:46:16 -0700
Organization: http://groups.google.com
Lines: 29
Message-ID: <1155487576.755318.253070@b28g2000cwb.googlegroups.com>
NNTP-Posting-Host: 67.53.150.18
Mime-Version: 1.0
Content-Type: text/plain; charset="iso-8859-1"
X-Trace: posting.google.com 1155487581 24153 127.0.0.1 (13 Aug 2006 16:46:21 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Sun, 13 Aug 2006 16:46:21 +0000 (UTC)
User-Agent: G2/0.2
X-HTTP-UserAgent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.6) Gecko/20060728 Firefox/1.5.0.6,gzip(gfe),gzip(gfe)
Complaints-To: groups-abuse@google.com
Injection-Info: b28g2000cwb.googlegroups.com; posting-host=67.53.150.18;
posting-account=ornCOQwAAAAyCG4a7NOAj_SMr54FiqNu
Xref: panix comp.protocols.kermit.misc:15527
System: C-Kermit 8.0.211 on Linux 2.6 (Ubuntu).
I have a simple script that does a straightforward interactive chat
with a remote system. Basically it is INPUTs and OUTPUTs, with ECHO
statements describing the action (e.g. ECHO "Waiting for login:").
I use the script as a "kerbang" script (starting with
#!/usr/local/bin/kermit +), have "set input echo on" and when I run the
script at the terminal it works as expected, with the output from the
remote system interspersed with the text from the ECHO statements.
However, when I redirect the output to a file thusly:
$ ./script.ksc > script.log 2>&1
strange things happen. Doing a "tail -f script.log" from another
window (or backgrounding the script and doing the "tail" from the same
window) reveals that the output from the remote system is showing up in
real time, but the output from the ECHO statements is not showing up
until the script terminates.
Why is this? It seems like the output from the input echo is going to
a buffer that is being flushed regularly, while the output from the
ECHO statements is going into another buffer that isn't being flushed.
Strange.
Any way to correct this behavior? I'd like to be able to monitor the
progress of a background Kermit task in real time.